/*
** Copyright (C) 2010 Calin Radoni
**
** This file is part of CHScanner.
**
** CHScanner is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** CHScanner is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with CHScanner. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "MimicInfoPack.h"

class PacketBuilderDhcp
{
private:
	int DhcpAddMagicCookie(BYTE*);
	int DhcpAddOption12(BYTE*, CString);
	int DhcpAddOption50(BYTE*, DWORD);
	int DhcpAddOption51(BYTE*, DWORD);
	int DhcpAddOption53(BYTE*, BYTE);
	int DhcpAddOption54(BYTE*, DWORD);
	int DhcpAddOption55XP(BYTE*);
	int DhcpAddOption55_2_4(BYTE*);
	int DhcpAddOption55_2_6(BYTE*);
	int DhcpAddOption55Nevada35(BYTE*);
	int DhcpAddOption57(BYTE*);
	int DhcpAddOption60XP(BYTE*);
	int DhcpAddOption602K3(BYTE*);
	int DhcpAddOption60Nevada35(BYTE*);
	int DhcpAddOption61(BYTE*, BYTE*);
	int DhcpAddOption81(BYTE*, CString);
	int DhcpAddOption116(BYTE*);

	int DhcpAddDiscoverOptionsXP(BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptionsXP(BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);

	int DhcpAddDiscoverOptions2K3(BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptions2K3(BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);

	int DhcpAddDiscoverOptions2_4(BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptions2_4(BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);

	int DhcpAddDiscoverOptions2_6(BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptions2_6(BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);

	int DhcpAddDiscoverOptionsNevada35(BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptionsNevada35(BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);

public:
	PacketBuilderDhcp(void);
	~PacketBuilderDhcp(void);

	int DhcpAddDiscoverOptions(MimicOS, BYTE*, BYTE*, DWORD, CString);
	int DhcpAddRequestOptions(MimicOS, BYTE*, BYTE*, DWORD, DWORD, CString, DWORD);
};
